test: move sparse-operator parity check to autolens_workspace_test#489
Merged
test: move sparse-operator parity check to autolens_workspace_test#489
Conversation
The deleted test called masked_dataset.apply_sparse_operator(), which imports jax.numpy inside ImagingSparseOperator. Library CI does not ship JAX (and shouldn't — see PyAutoArray/CLAUDE.md), so this test was breaking PyAutoBuild with ModuleNotFoundError: No module named 'jax'. The parity check itself is preserved — it now lives at autolens_workspace_test/scripts/jax_assertions/fit_imaging_sparse_operator.py alongside the analogous autoarray-level sparse_operators.py that was relocated for the same reason. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test__simulate_imaging_data_and_fit__complex_fit_compare_mapping_matrix_sparse_operatorfromtest_autolens/imaging/test_simulate_and_fit_imaging.py.masked_dataset.apply_sparse_operator(), which importsjax.numpyinsideImagingSparseOperator. Library CI does not ship JAX (perPyAutoArray/CLAUDE.md— JAX isxp-gated), so this test was breaking PyAutoBuild withModuleNotFoundError: No module named 'jax'.autolens_workspace_testatscripts/jax_assertions/fit_imaging_sparse_operator.py(companion PR linked below). This matches the precedent set when the autoarray-level analogue was previously moved toscripts/jax_assertions/sparse_operators.py(autolens_workspace_test PR Include profile name in output of paramnames file #68).Companion PR
Test plan
pytest test_autolens/imaging/test_simulate_and_fit_imaging.pyreports 7 passed (was 8).python scripts/jax_assertions/fit_imaging_sparse_operator.pyprintsfit_imaging_sparse_operator: all assertions passed.🤖 Generated with Claude Code